package com.study.designPattern.create.abstractFactory;

/**
 * @author ysy
 * @version 1.0
 * @Title: CarTypeFactory
 * @Note <b>ProjectName:</b> Pre-research
 * <br><b>PackageName:</b> com.study.designPattern.create.abstractFactory
 * <br><b>ClassName:</b>
 * <br><b>Date:</b>

 */
public class CarTypeFactory extends AbstractCarFactory{

    @Override
    public ICarType getCarType(String brandName) {
        if(brandName == null){
            return null;
        }
        if("Benz".equals(brandName)){
            return new Benz();
        }else if("Honda".equals(brandName)){
            return new Honda();
        }
        return null;
    }

    @Override
    public ICarPower getCarPower(String powerName) {
        return null;
    }
}
